import request from '@/utils/request'

export function getMachineList (params) {
  return request({
    url: '/api/machine/list',
    method: 'get',
    params
  })
}

export function addMachine (data) {
  return request({
    url: '/api/machine/add',
    method: 'post',
    data
  })
}

export function updateMachine (data) {
  return request({
    url: '/api/machine/update',
    method: 'post',
    data
  })
}

export function deleteMachine (id) {
  return request({
    url: '/api/machine/delete',
    method: 'post',
    data: { id }
  })
}